cmake_minimum_required(VERSION 3.1)

project(stun_server)

add_definitions(-isystem)

# set(CMAKE_C_COMPILER "/usr/bin/clang")
# set(CMAKE_CXX_COMPILER "/usr/bin/clang++")


set(CMAKE_CXX_STANDARD 11) # 设置C++标准为C++11
set(CMAKE_CXX_STANDARD_REQUIRED TRUE) # 必须使用C++11标准
# add_definitions(-std=c++11 -g)
# for sublime text clangd
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)


include_directories(./)
include_directories(./../)
include_directories(./../stun_client/)
include_directories(./../../loop_event/)

set(stun_server ./main.cpp)
aux_source_directory(./../ stun_server)
aux_source_directory(./../stun_server stun_server)

set(loop_event_list ./)
aux_source_directory(./../../loop_event loop_event_list)

add_executable(stun_server ${stun_server} ${loop_event_list} ./../../../util/byte_process.cpp ./../../../util/amf.cpp)

set(open_libs -lz ssl crypto)

target_link_libraries(stun_server ${open_libs})





